<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2023/9/5
  Time: 14:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="../jquery-2.0.0.min.js"></script>
    <script>
        function  show(){
            //使用jquery 发起异步请求
            $.ajax({
                url:'/Web1/ajax1',
                type:'post',
                data:{name:$("#aaa").val()},
                success:function (data) {
                    $("#c").text(data);
                }
            })
        }
    </script>
</head>
<body>
   <input type="text">
   <input type="text" id="aaa">
   <input type="button" onclick="show();" value="提交">
   <div id="c"></div>
</body>
</html>
